build: Don't append multiple flags as a string
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 12 Apr 2021 10:29:24 +0000 (11:29 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 13 Apr 2021 01:23:57 +0000 (21:23 -0400)
The gtk_debug_cflags variable is an array, with each argument stored in
a separate string; if we add multiple arguments inside the same string
we break the escaping rules.

Fixes: #3864
meson.build

index 26cda67aba8829a27827b3808ca214c179a93918..7223431ddf62c3fd1e292aa3a565fb225090d40d 100644 (file)
@@ -66,7 +66,7 @@ if debug
     gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
   endif
 elif optimization in ['2', '3', 's']
-  gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT'
+  gtk_debug_cflags += ['-DG_DISABLE_CAST_CHECKS', '-DG_DISABLE_ASSERT']
 endif
 
 add_project_arguments(gtk_debug_cflags, language: 'c')